a(1:3,1:100) = rand(3,100);
a(1:3,101:200) = rand(3,100)+1;
a(1:3,201:400) = rand(3,200)+2;
[K C P] = Isodata(a,4,10,1.5,0.8,10);
for i = 1 : 400
    if P(i) == 0 
        Co = [1,0,0] ;
    end
    if P(i) == 1 
        Co = [0,1,0] ;
    end
    if P(i) == 2 
        Co = [0,0,1] ;
    end
    plot3(a(1,i),a(2,i),a(3,i),'*','color',Co);hold on;
end